package org.project.service.user;

import java.util.List;

import javax.annotation.Resource;

import org.project.dao.user.StoreMapper;
import org.project.pojo.Store;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
@Transactional
public class StoreService {

	@Resource
	private  StoreMapper  storeMapper;
	
	public int add(Store s) { 
		 
		int i = storeMapper.insert(s);
		return i; 
	}

	public List<Store> getList() { 
	 
		List<Store> slist = storeMapper.getList();
		return slist;
	}

	public Store toUpdate(Integer id) {
		 
		Store s = storeMapper.selectByPrimaryKey(id);
		
		return s;
	}

	public int doUpdate(Store s) {
		 
		int i = storeMapper.updateByPrimaryKeyWithBLOBs(s);
		return i; 
	} 

	 

}
